1. Field of the Invention
The present invention relates to a system, method, and program for accessing data from one of two storage devices maintaining a copy of the data and, in particular, selecting one of the storage devices from which to recall a data set.
2. Description of the Related Art
In the prior art, a virtual tape storage system, hard disk drive storage is used to emulate tape drives and tape cartridges. In this way, host systems performing input/output (I/O) operations with respect to tape are in fact performing I/O operations with respect to a set of hard disk drives emulating the tape storage. In the prior art International Business Machines (IBM) Magstar Virtual Tape Server, one or more virtual tape servers are each integrated with a tape library comprising numerous tape cartridges, tape drives, and with a direct access storage device (DASD) comprised of numerous interconnected hard disk drives. The virtual tape server is transparent to the host. The host makes a request to access a tape volume. The virtual tape server intercepts the tape requests and accesses the volume in the DASD. If the volume is not in the DASD, then the virtual tape server recalls the volume from the tape drive to the DASD. The virtual tape server can respond to host requests for volumes in tape cartridges from DASD substantially faster than responding to requests for data from a tape drive. Thus, the DASD functions as a tape volume cache for volumes in the tape cartridge library.
In the prior art, two virtual tape servers, each integrated with a separate tape library, can provide access and storage for the same data volumes. By providing two virtual tape servers and two libraries, if an operation to recall a file from one virtual tape server and tape library fails, then the file may still be recalled from the other virtual tape server and tape library. This redundant architecture provides greater data and tape availability and improved data shadowing in the event a tape in one system is damaged. In prior art systems, Enterprise System Connection (ESCON)** channels can provide communication from numerous hosts to the virtual tape servers. Each ESCON channel in the system has one or more virtual tape controllers that select a virtual tape server to handle the host I/O request.
**AIX, ESCON, Magstar, and RS/6000 are registered trademarks of IBM. 
In the prior art, each virtual tape server includes a token database including control information for each volume in the tape library. The token database would indicate a data level for each volume and whether the volume is valid. During operations, the virtual tape servers perform synchronization operations to ensure that both virtual tape servers include the most recent version of data. A prior art virtual tape server receiving an update to a volume will increase the data level in the token for the updated volume. Thus, the prior art virtual tape server receiving the update will have a higher level for a volume than the virtual tape server that did not receive an update. During update operations, the valid flags in both the virtual tape servers' tokens for the volume are set to invalid to prevent access to the volume while it is being updated. If the virtual tape controller receives a host data request and one virtual tape server has a higher data level version of the requested file than the other server, then the virtual tape controller will select the virtual tape server having the highest data level. After data is synchronized in the prior art between virtual tape servers; the virtual tape servers will each include the same data, have their data levels set equal, and have their valid flag set.
Prior art techniques will sometimes not select the virtual tape server most likely to be capable of providing access to valid data. Thus, there is a need in the art for improved mechanisms for providing access to data when two virtual data servers are used.